/**
 * 物料分类表 api 封装
 *
 * @Author:    ADog
 * @Date:      2025-09-19 19:48:13
 * @Copyright  1.0
 */
import { postRequest, getRequest } from '/@/lib/axios';

export const materialCategoryApi = {

  /**
   * 分页查询  @author  ADog
   */
  queryPage : (param) => {
    return postRequest('/materialCategory/queryPage', param);
  },

  /**
   * 增加  @author  ADog
   */
  add: (param) => {
      return postRequest('/materialCategory/add', param);
  },

  /**
   * 修改  @author  ADog
   */
  update: (param) => {
      return postRequest('/materialCategory/update', param);
  },


  /**
   * 删除  @author  ADog
   */
  delete: (id) => {
      return getRequest(`/materialCategory/delete/${id}`);
  },

  /**
   * 批量删除  @author  ADog
   */
  batchDelete: (idList) => {
      return postRequest('/materialCategory/batchDelete', idList);
  },
  /**
   * 获取分类树
   */
  getTree: () => {
    return getRequest('/materialCategory/getTree');
  }
};
